<?php
class CategoriesForm extends Zend_Form {
    public function __construct($options = null) 
    {
    	$baseurl 	= new MHDEV_View_Helper_BaseUrl();
    	$translate	= Zend_Registry::get('lang');
    	
        parent::__construct($options);
        
        $this->setName('categories');
        
        // title
        $title = new Zend_Form_Element_Text('title');
        $title->setLabel($translate->_('admin_cats_title'));
        $title->setRequired(true);
        $title->addValidator('NotEmpty');
        $title->setErrorMessages(array(
            0 => $translate->_('admin_cats_error')
        ));
        
        // lang
        $lang = new Zend_Form_Element_Text('lang_key');
        $lang->setLabel($translate->_('admin_cats_lang'));
        $lang->setDescription($translate->_('admin_cats_dlang'));
 		
        // sort_uid
		$sort_uid = new Zend_Form_Element_Text('sort_uid');
		$sort_uid->setLabel($translate->_('admin_cats_sort'));
		$sort_uid->setDescription($translate->_('admin_cats_dsort'));
		
		// hidden
		$hidden = new Zend_Form_Element_Checkbox('is_hidden');
		$hidden->setLabel($translate->_('admin_cats_hidden'));
		$hidden->setDescription($translate->_('admin_cats_dhidden'));
		
        // delete
		$delete = new Zend_Form_Element_Checkbox('is_deleted');
		$delete->setLabel($translate->_('form_cats_delete'));
		$delete->setDescription($translate->_('form_cats_ddelete'));
		
        // Submit
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel($translate->_('form_save'));

        
        $this->addElements(array($title, $lang, $sort_uid, $hidden, $delete, $submit));
    }
}  
?>